<?php require 'lib/session_verify.php' ?>
<?php require 'lib/examed_verify.php' ?>
<?php
require 'lib/student_objective_anwser.php';

session_start();
define('NUM_OBJ_ITEM', 20);
for($i = 1 ; $i < NUM_OBJ_ITEM + 1 ; ++$i) {
	$itemno = 'objitem' . $i;
	$itemid = 'objitem' . $i . 'id';
	$soa = new StudentObjAnwser;
	$soa->sid = $_SESSION['sid'];
	$soa->objitemid = $_POST["$itemid"];
	$soa->stuselect = $_POST["$itemno"];
	$_SESSION["$itemno"] = $soa; /* 此处或许传引用比较好 */
}

session_write_close();

#var_dump($_SESSION);
header('Location: exam_true_false.php');
?>
